package com.harmontronics.hanma.paas.paas.service;

import com.harmontronics.hanma.paas.paas.common.PageBase;
import com.harmontronics.hanma.paas.paas.domain.app.entity.HmModel;

import com.harmontronics.hanma.paas.paas.domain.app.service.dialect.ViewColumn;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;

public interface IHmModelAppService {
    HmModel findById(Long id);
    HmModel findByCode(String code);
    Long save(HmModel hmModel);
    List<HmModel> getList();

    void update(HmModel hmModel);

    List<String> remove(List<Long> ids);

    void validField(Long id, String field, String value);

    void addData(Long pageId, Map<String, Object> data);

    void editData(Long pageId, Map<String, Object> data);

    void deleteData(Long pageId, Long dataId);

    PageBase<Map<String, Object>> listData(Long pageId, Map<String, Object> params, List<String> orderRules, Integer pageNo, Integer pageSize) throws SQLException;

    PageBase<HmModel> getList(String modelTypes, String name, int pageNo, int pageSize);

    List<ViewColumn> getViewColumns(Long modelId);
    Map<String, Object> getData(Long pageId, Long id);
}
